Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other: take ownership of config and matches when building App #1215

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

ClementTsang
Copy link
Owner

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

The clap matches/config struct was taken in as a reference when building the App structure. However, we do not need to keep these around after this, so we can instead take ownership of the match/config and drop it after to save a bit of memory.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (594e091) 31.54% compared to head (9f22628) 31.57%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1215      +/-   ##
==========================================
+ Coverage   31.54%   31.57%   +0.02%     
==========================================
  Files          97       97              
  Lines       16498    16503       +5     
==========================================
+ Hits         5205     5210       +5     
  Misses      11293    11293              
Flag Coverage Δ
macos-12 33.14% <100.00%> (+0.02%) ⬆️
ubuntu-latest 33.14% <100.00%> (+0.02%) ⬆️
windows-2019 33.39% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/args.rs 100.00% <ø> (ø)
src/lib.rs 2.90% <ø> (ø)
src/bin/main.rs 37.33% <100.00%> (+0.27%) ⬆️
src/options.rs 80.63% <100.00%> (+0.10%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClementTsang ClementTsang force-pushed the take-config-and-matches-ownership branch from 87075d1 to 2a17f0d Compare June 19, 2023 05:24
The clap matches/config struct was taken in as a reference when building
the App structure. However, we do not need to keep these around after
this, so we can instead take ownership of the match/config and drop it
after to save a bit of memory.
@ClementTsang ClementTsang force-pushed the take-config-and-matches-ownership branch from 2a17f0d to 9f22628 Compare June 19, 2023 05:37
@ClementTsang ClementTsang merged commit 751abec into master Jun 19, 2023
@ClementTsang ClementTsang deleted the take-config-and-matches-ownership branch June 19, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant